<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文件目录选择器</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            padding: 20px;
        }
        
        .container {
            background-color: white;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            padding: 40px;
            width: 90%;
            max-width: 500px;
            text-align: center;
        }
        
        h1 {
            color: #333;
            margin-bottom: 10px;
            font-weight: 600;
        }
        
        .description {
            color: #666;
            margin-bottom: 30px;
            line-height: 1.5;
        }
        
        .select-button {
            background: linear-gradient(to right, #4776E6, #8E54E9);
            color: white;
            border: none;
            padding: 14px 28px;
            font-size: 16px;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(142, 84, 233, 0.3);
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .select-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(142, 84, 233, 0.4);
        }
        
        .select-button:active {
            transform: translateY(0);
        }
        
        .file-input {
            display: none;
        }
        
        .result-container {
            margin-top: 30px;
            text-align: left;
            background-color: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            border-left: 4px solid #4776E6;
        }
        
        .result-label {
            font-weight: 600;
            color: #555;
            margin-bottom: 8px;
            display: block;
        }
        
        .result-path {
            background-color: #e9ecef;
            padding: 12px;
            border-radius: 6px;
            word-break: break-all;
            font-family: monospace;
            color: #333;
            min-height: 50px;
            border: 1px dashed #adb5bd;
        }
        
        .icon {
            font-size: 18px;
        }
        
        .hint {
            margin-top: 15px;
            font-size: 14px;
            color: #6c757d;
            font-style: italic;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>文件目录选择器</h1>
        <p class="description">点击下方按钮选择文件，系统将返回该文件所在的文件夹路径</p>
        
        <button class="select-button" id="selectButton">
            <span class="icon">📁</span>
            选择文件
        </button>
        <button class="select-button" id="test">
            <span class="icon">📁</span>
            测试
        </button>

        <div class="result-container">
            <span class="result-label">文件夹路径：</span>
            <div class="result-path" id="resultPath">
                尚未选择文件
            </div>
            <p class="hint">提示：选择文件后，这里将显示该文件所在的文件夹路径</p>
        </div>
    </div>

    <script src="./render.js"></script>
</body>
</html>